package com.crm.service.userForumManager;

import com.crm.model.entity.userForumManager.UserForumReply;
import com.crm.model.vo.userForumManager.UserForumReplyVO;

import java.util.List;

/**
 * @Author:chaifuyou
 * @Date: 2021/5/24 9:42
 */
public interface UserForumReplyDbService {

    /**
     * 添加评论
     * @param userForumReply
     */
    boolean addForumReply(UserForumReply userForumReply);

    /**
     * 查看评论
     * @param userForumId
     * @param order
     * @return
     */
    List<UserForumReplyVO> selectForumReply(String userForumId, String order);

    /**
     * 查看子评论
     * @param userForumReplyId
     * @param toString
     * @return
     */
    List<UserForumReplyVO> selectForumSonReply(String userForumReplyId, String toString);

    /**
     * 加阅读次数
     * @param userForumId
     */
    void addReadNumberByUserForumId(String userForumId);

    /**
     * 通过评论级别和pid查询评论
     * @param level
     * @param order
     * @param limit
     * @param pid
     * @return
     */
    List<UserForumReplyVO> selectForumReplyByLevel(Integer level, String order, Integer limit, String pid,String userForumId);

    /**
     *通过pid查询评论
     * @param level
     * @param order
     * @param limit
     * @param pid
     * @param userForumId
     * @return
     */
    List<UserForumReplyVO> selectForumReplyByPid(Integer level, String order, Integer limit, String pid,String userForumId);

    /**
     * 根据评论id查询
     * @param userForumReplyId
     * @return
     */
    UserForumReplyVO selectForumReplyById(String userForumReplyId);

    /**
     * 删除评论
     * @param userForumReplyId
     * @return
     */
    boolean delForumReply(String userForumReplyId);
}
